﻿@model dynamic

@{ bool isThread = Model is mesoBoard.Data.Thread;
   bool isForum = Model is mesoBoard.Data.Forum; }


    @if (isForum)
    { 
        <text>
        @Html.ActionLink("Board Index", "Index", "Board")
        &raquo;
        @Html.ActionLink((string)Model.Category.Name, "Index", "Board", null, new { @class = !isThread && !isForum  ? "current" : "" })    
        &raquo;
        @Html.ActionLink((string)Model.Name, "ViewForum", "Board", new { ForumID = Model.ForumID }, new { @class = "current" })       
        </text>
     } 
     else if (isThread)
     { 
         <text>
        @Html.ActionLink("Board Index", "Index", "Board")    
        &raquo;
        @Html.ActionLink((string)Model.Forum.Category.Name, "Index", "Board", null, new { @class = !isThread && !isForum  ? "current" : "" })    
        &raquo;
        @Html.ActionLink((string)Model.Forum.Name, "ViewForum", "Board", new { ForumID = Model.Forum.ForumID }, null)       
        &raquo;
        @Html.ActionLink((string)Model.Title, "ViewThread", "Board", new { ThreadID = Model.ThreadID }, new { @class = "current" })
        </text>
     } 

